#!/usr/bin/env python
# -*- coding: utf-8 -*-

from distutils.core import setup
import zipfile
import py2exe
import glob
import sys
import shutil
import os

version = "1.0"

sys.argv.append("py2exe") #Avoids having to use the command line
sys.argv.append("-q") #silent mode
sys.path.append(".")
setup(
    #Define the executable....
    windows = [
                {
                    "script": "iseedeadpixels.py",
                    "name": "I see dead pixels",
                    "version":version,
                    "description":"A program to test if there are dead pixels on a screen",
                }
                ], 
    #Optional stuff - the following bundles data files with the executable - edit as required
    data_files = [],
    options = {"py2exe":{"excludes" : ['_gtkagg', '_tkagg', 'bsddb', 'curses', 'email', 'pywin.debugger',
                                    'pywin.debugger.dbgcon', 'pywin.dialogs', 'tcl',
                                    'Tkconstants', 'Tkinter', 'numpy', 'OpenGL', 'pyreadline'],
                        "dll_excludes": ['libgdk-win32-2.0-0.dll', 'libgobject-2.0-0.dll', 'tcl84.dll',
                                    'tk84.dll'],
                        "bundle_files": 1,
                        "compressed": 1,
                        "optimize": 2,
                        }
                },
    zipfile = None,
    )

print "removing build directory..."
# Remove the build directory
shutil.rmtree("build", ignore_errors=True)
print "FIN"